package com.liaoct.lct.listener;

import com.liaoct.lct.activity.LoginActivity;
import com.liaoct.lct.util.Constant;

import android.view.View;
import android.view.View.OnClickListener;

/**
 * 登录页面的按钮监听类
 * 
 * @author liaoct
 * 
 */
public class LoginOnClickListener implements OnClickListener {

	private LoginActivity activity;

	private int identity;

	public LoginOnClickListener(LoginActivity activity, int identity) {
		this.activity = activity;
		this.identity = identity;
	}

	@Override
	public void onClick(View v) {
		switch (this.identity) {
		case Constant.BUTTON_LOGIN:
			activity.login();
			break;

		case Constant.BUTTON_REGISTER:
			activity.register();
			break;
		}

	}

}
